<template>
  <div class="notice">
    <div class="notice-swipe">
      <div class="notice-swipe_left">
        <img src="@/assets/img/jiangtang.png" alt="">
      </div>
      <div class="notice-swipe_center">
        <van-swipe style="" vertical :autoplay="3000" :duration="1500" :show-indicators="false">
          <van-swipe-item v-for="msg in notices" :key="msg.id">
            <span> {{msg.title}}</span>
          </van-swipe-item>
        </van-swipe>
      </div>
      <div class="notice-swipe_more">
        <a href="javascript:;">更多</a>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props:{
    notices:{
      type:Array,
      required:true
    }
  }
};
</script>

<style lang="less" scoped>
.notice {
  padding: 10px;
  &-swipe {
    box-sizing: border-box;
    width: 100%;
    height: 44px;
    border-radius: 23px;
    margin: 0 auto;
    background-color: #effdfd;
    background: -webkit-linear-gradient(left, #f5fcff, #e9fffc);
    padding:0 15px ;
    display: flex;
    justify-content: space-between;
    align-items: center;
    &_left{
      width: 90px;
      height: 26px;
      img{
        width: 100%;
      }
    }
    &_center{
      width: 200px;
      height: 26px;
      overflow: hidden;
      .van-swipe{
        height: 100%;
      }
      span{
        line-height: 26px;
        display: inline-block;
        font-size:12px;
        color: #333; 
        width: 150px;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
      }
    }
    &_more{
      a{
        border-left:1px solid #ddd; 
        padding-left:8px; 
        color: #333;
        font-size:12px; 
        line-height: 12px;
      }
    }
  }
}
</style>
